<!--
 * @Author: your name
 * @Date: 2021-07-13 21:44:55
 * @LastEditTime: 2021-07-16 08:58:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \练习库e:\72-briup\briupteamproj\src\views\components\Carousel.vue
-->
<template>
  <div class="carousel">
    <el-carousel :interval="8000" height="17em">
      <el-carousel-item v-for="item in carousel" :key="item.id">
        <img :src="item.url" alt="item.introduce" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  props: {
    carousel: {
      type: Array,
      default() {
        return []
      },
    },
  },
}
</script>

<style scoped>
* {
  padding: 0;
  margin: 0;
}
/* 轮播图 */
.el-carousel__item img {
  width: 100%;
  height: 100%;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>